import React, { Component } from 'react';
import store from './store';

import Cmp1 from './Cmp1';

//redux
//state必须是唯一的
class App extends Component {
  constructor(...args){
    super(...args);
  }

  fn1(){
    store.dispatch({type: 'addUser'});
  }
  fn2(){
    store.dispatch({type: 'addCompany'});
  }

  render() {
    return (
      <div>
        <input type="button" value="注册一个普通用户" onClick={this.fn1.bind(this)} />
        <input type="button" value="注册一个企业用户" onClick={this.fn2.bind(this)} />
        <Cmp1></Cmp1>
      </div>
    );
  }
}

export default App;
